Builder

class Builder

Builds a ConfigAction

Author

fzzyhmstrs

Since

0.5.0

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Determines whether the button should be active or not. Polled every frame.

Link copied to clipboard

Sets a custom background for the button widget, which will appear when the button is selected and active

Link copied to clipboard

Builds the ConfigAction with the provided runnable as the on-click event

fun build(clickEvent: ClickEvent): ConfigAction

Builds the ConfigAction with the supplied ClickEvent as the on-click event

Link copied to clipboard
fun decoration(id: Identifier): ConfigAction.Builder

Defines a decoration texture id. This will be drawn to the left of the button widget in the config screen. Decorations are typically 20x20 at the most

Link copied to clipboard
fun desc(desc: Text): ConfigAction.Builder

Defines the tooltip description for this button. Default is no tooltip.

Link copied to clipboard

Adds a flag to this Action.

Link copied to clipboard
fun title(titleSupplier: Supplier<Text>): ConfigAction.Builder

Sets the title of the widget. This can be dynamically provided as needed, the title is polled from the supplier every frame.

fun title(title: Text): ConfigAction.Builder

Sets the title of the widget. This will be a static title, unchanging based on state.